# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=bleah
pkgver=54.56672e8
pkgrel=3
pkgdesc='A BLE scanner for "smart" devices hacking.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-wireless'
        'blackarch-bluetooth')
arch=('any')
url='https://github.com/evilsocket/bleah'
license=('GPL3')
depends=('python2' 'python2-argparse' 'python2-terminaltables' 'python2-bluepy')
makedepends=('git')
source=("git+https://github.com/evilsocket/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

